<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateLogDropLevels extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('log_drop_levels', function (Blueprint $table) {
            $table->increments('id');
            $table->tinyInteger('type')->comment('类型:1全服,2渠道,3区服');
            $table->integer('server_id')->default(0)->comment('区服ID');
            $table->integer('channel_id')->default(0)->comment('渠道ID');
            $table->smallInteger('level')->comment('等级');
            $table->smallInteger('role_number')->comment('角色数量');
            $table->float('wastage_rate')->comment('流失率');
            $table->float('level_proportion')->comment('等级比重');
            $table->float('total_level_proportion')->comment('累积等级比重');
            $table->smallInteger('three_not_online_number')->comment('三天未在线人数');
            $table->float('three_wastage_rate')->comment('三天流失率');
            $table->smallInteger('one_day_not_online')->comment('24时未在线人数');
            $table->float('one_day_wastage_rate')->comment('24时流失率');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('log_drop_levels');
    }
}
